//
//  GRUserListTableViewCell.m
//  YC_GRice
//
//  Created by luojinrong11 on 2019/4/17.
//  Copyright © 2019 YeCai. All rights reserved.
//

#import "GRUserListTableViewCell.h"
#import "GRBargainUserCell.h"
@implementation GRUserListTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.userList.delegate = self;
    self.userList.dataSource = self;
    [self.userList registerNib:[UINib nibWithNibName:@"GRBargainUserCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"bargainUserCell"];
    self.userList.tableFooterView = [[UIView alloc]init];
}

-(void)setUserArr:(NSArray *)userArr{
    _userArr = userArr;
    [self.userList reloadData];
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    GRBargainUserCell * bargainUserCell = [tableView dequeueReusableCellWithIdentifier:@"bargainUserCell" forIndexPath:indexPath];
    bargainUserCell.userModel = self.userArr[indexPath.row];
    return bargainUserCell;
    
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 55;
}

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return self.userArr.count;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
